/**
 * 基础路由
 * @type { *[] }
 */

import { RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> =[
		{
			path: '/login',
			name: 'login',
			component: () => import('../views/login/login.vue'),
			meta: {
				code:0,
				title: '登陆',
				keepAlive: true
			}
		},
		{
			path: '/',
			name: '_home',
			redirect: '/home',
			meta: {
				code:1,
				title: '',
				breadcrumb:false,
			},
			component: () => import('../components/NavBar/navBar.vue'),
			children: [
				{
					path: '/home',
					component:() => import('../views/home/index.vue'),
					name: '首页',
					meta: {
						code:1,
						title: '首页',
						keepAlive: true,
						breadcrumb:false,
					},
				}
			],
		},
		{
			path: '/assembly',
			name: '频道设置', //这是面包屑导航用到的
			component:() => import('../components/NavBar/navBar.vue'),
			meta: {
				code:2,
				title: '频道设置',
				keepAlive: true,
				breadcrumb:true,
				tagList:false,
				iconClass: 'zujian',
			},
			children: [
				{
					path: 'classfiy',
					name: '分类管理',//这是面包屑导航用到的
					component:() => import('../views/table/index.vue'),
					meta: {
						code:201,
						title: '分类管理',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'ziti',
					},
				},
				{
					path: 'channel',
					name: '频道管理',
					component:() => import('../views/channel/index.vue'),
					meta: {
						code:202,
						title: '字体',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'wenzi',
					},
				},
				{
					path: 'souce',
					name: '源管理',
					component:() => import('../views/souce/index.vue'),
					meta: {
						code:203,
						title: '源管理',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'biaoge1',
					},
				},
				{
					path: 'allsouce',
					name: '源汇总',
					component:() => import('../views/allsouce/index.vue'),
					meta: {
						code:204,
						title: '源汇总',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				}
			],
		},
		{
			path: '/mini',
			name: '小程序设置',
			component:() => import('../components/NavBar/navBar.vue'),
			meta: {
				code:3,
				title: '小程序设置',
				keepAlive: true,
				breadcrumb:true,
				tagList:false,
				iconClass: 'chajianku-chajianku',
			},
			children: [
				{
					path: 'minifenlei',
					name: '小程序分类',
					component:() => import('../views/miniclassfiy/miniclassfiy.vue'),
					meta: {
						code:301,
						title: '小程序分类',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'baoxiao',
					name: '爆笑',
					component:() => import('../views/baoxiao/baoxiao.vue'),
					meta: {
						code:302,
						title: '爆笑',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'shenhuifu',
					name: '神回复',
					component:() => import('../views/shenhuifu/shenhuifu.vue'),
					meta: {
						code:303,
						title: '神回复',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'lengxiaohua',
					name: '奇葩秀',
					component:() => import('../views/lengxiaohua/lengxiaohua.vue'),
					meta: {
						code:304,
						title: '奇葩秀',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'leirenyulu',
					name: '毒鸡汤',
					component:() => import('../views/leirenyulu/leirenyulu.vue'),
					meta: {
						code:305,
						title: '毒鸡汤',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'gaoxiaotupian',
					name: '搞笑图片',
					component:() => import('../views/gaoxiaotupian/gaoxiaotupian.vue'),
					meta: {
						code:306,
						title: '搞笑图片',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'caidengmi',
					name: '猜灯谜',
					component:() => import('../views/caidengmi/caidengmi.vue'),
					meta: {
						code:307,
						title: '猜灯谜',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'naojinjizhuanwan',
					name: '脑筋急转弯',
					component:() => import('../views/naojinjizhuanwan/naojinjizhuanwan.vue'),
					meta: {
						code:308,
						title: '脑筋急转弯',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'xiehouyu',
					name: '歇后语',
					component:() => import('../views/xiehouyu/xiehouyu.vue'),
					meta: {
						code:309,
						title: '歇后语',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'zhufuduanxin',
					name: '祝福短信',
					component:() => import('../views/zhufuduanxin/zhufuduanxin.vue'),
					meta: {
						code:310,
						title: '祝福短信',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'weimeijuzi',
					name: '唯美句子',
					component:() => import('../views/weimeijuzi/weimeijuzi.vue'),
					meta: {
						code:311,
						title: '唯美句子',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'tuweiqinghua',
					name: '土味情话',
					component:() => import('../views/tuweiqinghua/tuweiqinghua.vue'),
					meta: {
						code:311,
						title: '土味情话',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				}
			],
		},
		{
			path: '/plug',
			name: '电影设置',
			component:() => import('../components/NavBar/navBar.vue'),
			meta: {
				code:4,
				title: '电影设置',
				keepAlive: true,
				breadcrumb:true,
				tagList:false,
				iconClass: 'chajianku-chajianku',
			},
			children: [
				{
					path: 'filmfenlei',
					name: '电影分类',
					component:() => import('../views/classfiy/index.vue'),
					meta: {
						code:401,
						title: '电影分类',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				},
				{
					path: 'filmadmin',
					name: '电影管理',
					component:() => import('../views/films/index.vue'),
					meta: {
						code:402,
						title: '电影管理',
						keepAlive: true,
						breadcrumb:true,
						tagList:true,
						iconClass: 'xuanxiangka',
					},
				}
			],
		},
		{
			path: '/404',
			component:() => import('../views/404/index.vue'),
			name: '404',
			meta: {
				title: '404',
				keepAlive: false
			}
		},
		{
		    path: '/:pathMatch(.*)', //重定向到404
		    redirect: '/404'
		}
	]

export default routes